<template>
    <childComponent />
</template>

<script setup lang="jsx">
import { ref } from "vue";

const content = ref('')

const childComponent = () => {
    const handleInput = (e) => {
        content.value = e.target.value
    }

    return (
        <div>
            <input value={content.value} onInput={handleInput}></input>
            <div>输入的内容是：{content.value}</div>
            <button onClick={() => content.value = ''}>重置</button>
        </div>
    )
}
</script>
